// eventBus.ts
import mitt from 'mitt';
import { WebSocketMessage } from '@/interface/type';    
// 定义事件类型
type Events = {
    'message-received': WebSocketMessage;
  };
  
  export const eventBus = mitt<Events>();
